<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
</head>
<body>
    <button id="btn">点击</button>
<script type="text/javascript">
    $(function () {
        function sendAjax(url) {
            return new Promise((resolve, reject) => {
                $.ajax({
                    url: url,
                    data: "",
                    type: "GET",
                    success: function (data) {
                        resolve(data);
                    },
                    dataType: "json"
                });
            });
        }
        
        $("#btn").click(async function () {
            let sentence = await sendAjax("https://api.apiopen.top/api/sentences");
            console.log(sentence);
            return false;
        });
    });
</script>
</body>
</html>